<?php
class User_Member extends User_Base
{
	public function __construct ($uid, $user_info = NULL)
	{
		$this->_role_id   = 'member';
		$this->_user_id   = $uid;
		$this->_user_info = $user_info;

		parent::__construct($uid);
	}

	public function get_im ()
	{
		return User_Member_IM::im($this->_user_id);
	}

    public function upgrade_to_merchant()
    {
        $this->set_info(array('utype' => 'merchant'));
        $this->_user_info = self::user_info_by_uid($this->_user_id);

        Events::notify(Kohana::config('events.user.created'), $this->_user_info);
    }
}
